﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

namespace 聚欣订单分析
{
    public partial class user : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Page.Title = " 订单分析系统";
            }
            if (Session["qx"] == null)
            {
                Response.Redirect("login.aspx");
            }
            else if (Session["qx"].ToString() != "99")
            {
                Response.Redirect("login.aspx");
            }
        }

        protected void ASPxGridView1_RowValidating(object sender, DevExpress.Web.Data.ASPxDataValidationEventArgs e)
        {
            if (e.NewValues["UserName"] == null)
            {
                e.RowError = "用户名不能为空！";
                return;
            }
            if (e.NewValues["realname"] == null)
            {
                e.RowError = "真实姓名不能为空！";
                return;
            }
            if (e.NewValues["qx"] == null)
            {
                e.RowError = "角色不能为空！";
                return;
            }
        }
    }
}
